package com.centit.springbootdemo03.service.impl;

import com.centit.springbootdemo03.entity.User;
import com.centit.springbootdemo03.mapper.UserMapper;
import com.centit.springbootdemo03.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhao_jx
 * @date 2020/7/5 10:40
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public List<User> queryAllUser(User user) {
        return userMapper.queryAllUser(user);
    }

    @Override
    public User getUserById(Long userId) {
        return userMapper.getUser(userId);
    }
}
